"use strict;"

//rpc调用模板 java调用
{{rpc_procedure}}

function rpc_call(){

    setTimeout(function(){

        Java.perform(function() {

           {{call_rpc_name}}

        });

    },50);
}

rpc.exports = {

    run: function (){

        return new Promise(function(resolve,reject){

            try{
                resolve(rpc_call());
            }catch(e){
                console.error(" --> rpc call error "+ String(e));
                reject(e);
            }
        });
    }
}